﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KinSocket;

namespace KinConquer.Packets.Structures
{
    public unsafe struct ItemUsage
    {
        public UInt16 Size;
        public UInt16 Type;
        public UInt32 Identifier;
        public UInt32 dwParam;
        public Types UsageType;
        public UInt32 Timer;
        public UInt32 wParam1;

        public static ItemUsage Create()
        {
            ItemUsage packet = new ItemUsage();
            packet.Size = 29;
            packet.Type = 1009;
            return packet;
        }

        public enum Types : uint
        {
            BuyItem = 0x01,
            SellItem = 0x02,
            RemoveInventory = 0x03,
            Equip = 0x04,
            SetEquipPosition = 0x05,
            Unequip = 0x06,
            UpgradeEnchant = 0x07,
            ShowWarehouseGold = 0x09,
            DepositWarehouseGold = 0x0A,
            WithdrawWarehouseGold = 0x0B,
            RepairItem = 0x0E,
            UpdateDurability = 0x11,
            RemoveEquipment = 0x12,
            UpgradeDragonball = 0x13,
            UpgradeMeteor = 0x14,
            ShowVendingList = 0x15,
            AddVendingItemGold = 0x16,
            RemoveVendingItem = 0x17,
            BuyVendingItem = 0x18,
            UpdateArrowCount = 0x19,
            ParticleEffect = 0x1A,
            AccessoryActivate = 0x29,
            LinkedItemClicked = 0x34,
            Ping = 0x1B,
            UpdateEnchant = 0x1C,
            AddVendingItemConquerPts = 0x1D,
            UpdatePurity = 0x23,
            DropItem = 0x25,
            DropGold = 0x26,
            Split = 0x31,
            SwapGarments = 0x35
        }
    }
}
